{extend name="$BASE_POPUP_FORM" /}
{block name="body"}
<div class="box-content">
    <div class="control-row col-2">
        <div class="control-group">
            <label class="control-label">用户名</label>
            <div class="controls">
                <input id="user_id" name="user_id" data-ui="combosearch" data-options="{valueField:'id',textField:'username',showList:true,matchFields:['username'],data:user_data,searchWin:openSearchWin}"
                       class="form-control"/>
            </div>
        </div>

        <div class="control-group">
            <label class="control-label">任务包名称</label>
            <div class="controls">
                <input id="equip_id" name="equip_id" data-ui="combosearch" data-options="{valueField:'id',textField:'equip_name',showList:true,matchFields:['equip_name'],data:equip_data}"
                       class="form-control"/>
            </div>
        </div>
        
    </div>
</div>
{/block}
{block name="script"}
<script type="text/javascript">
var user_data ={$user_list};
var equip_data ={$equip_list};
function openSearchWin(){
    var url = getURL('member/select_user','','member');
    openBarWinParent('选择用户', 500, 600, url, function (data) {
        $("#user_id").setValue(data);
    }, ['选定', '取消']);
}
function openSearchEquipWin(){
    var url = getURL('equip/select','','equip');
    openBarWinParent('选择用户', 500, 600, url, function (data) {
        $("#user_id").setValue(data);
    }, ['选定', '取消']);
}
</script>
{/block}


